package main

import (
	"fmt"
	"time"
)

func main() {

	fmt.Println("start")

	chan1 := make(chan bool, 1)
	chan2 := make(chan string, 1)

	go func() {
		select {
		case <-chan1:
			{
				fmt.Println("go chan1 1")
			}
		case data := <-chan2:
			{
				fmt.Println("go chan2", data)
			}
		}
	}()

	go func() {
		select {
		case <-chan1:
			{
				fmt.Println("go chan1 2")
			}
		}
	}()

	chan1 <- true
	//chan1 <- true
	//chan1 <- true
	//chan1 <- true
	//chan2 <- "hahah"
	//chan2 <- "hahah"

	time.Sleep(10 * time.Second)
}
